<% layout('/layouts/default.html', {title: '报警表管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
			</div>
			<div class="box-tools pull-right">
<!--				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>-->
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${rtError}" action="${ctx}/rt/rtError/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('SN号')}：</label>
					<div class="control-inline">
						<#form:input path="sn" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('报警模块')}：</label>
					<div class="control-inline">
						<#form:input path="module" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('报警项报警项报警项')}：</label>
					<div class="control-inline">
						<#form:input path="item" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('报警级别')}：</label>
					<div class="control-inline">
						<#form:input path="alarmlevel" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('报警类别')}：</label>
					<div class="control-inline">
						<#form:input path="alarmtype" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('建议')}：</label>
					<div class="control-inline">
						<#form:input path="recommend" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('近24小时报警次数')}：</label>
					<div class="control-inline">
						<#form:input path="times" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("SN号")}', name:'sn', index:'a.sn', width:250, align:"left"},
		{header:'${text("报警模块")}', name:'module', index:'a.module', width:150, align:"left"},
		{header:'${text("报警项报警项报警项")}', name:'item', index:'a.item', width:150, align:"left"},
		{header:'${text("报警级别")}', name:'alarmLevel', index:'a.alarmlevel', width:150, align:"left"},
		{header:'${text("报警类别")}', name:'alarmType', index:'a.alarmtype', width:150, align:"left"},
		{header:'${text("建议")}', name:'recommend', index:'a.recommend', width:250, align:"left", formatter: function(val, obj, row, act){
				return '<p style=" word-wrap: break-word;white-space: normal;display: block;">'+val+'</p>';
		}},
		{header:'${text("近24小时报警次数")}', name:'times', index:'a.times', width:150, align:"center"},

	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>